class CreateUserSettings < ActiveRecord::Migration
  def self.up
    create_table :user_settings do |t|
      t.references :user, :null => false
      t.string :name, :null => false
      t.string :value
      t.timestamps
    end
    execute "ALTER TABLE user_settings ADD CONSTRAINT fk_user_settings_user FOREIGN KEY (user_id) REFERENCES users(id)"
  end

  def self.down
    drop_table :user_settings
  end
end
